home *** CD-ROM | disk | FTP | other *** search
/ The Arsenal Files 8 / The Arsenal Files Collection #8 (Arsenal Computer) (1996).ISO / prg_gen / swag.zip / READER.DOC < prev    next >
Text File  |  1996-11-29  |  21KB  |  451 lines

  1.  
  2.  
  3.                              READER.EXE v3.13
  4.                            (SWAG packet READER)
  5.                                 (c) GDSOFT
  6.                                  May 1996
  7.  
  8. INTRODUCTION
  9. ------------
  10.  
  11. SWAG (SourceWare Archival Group) is a collection of source code and program
  12. examples for the PASCAL programming language. The material has been donated
  13. by  various  PASCAL  programmers  from  around  the  world,  who  desire to
  14. contribute to the advancement of  one of the greatest programming languages
  15. there is.  MANY THANKS to all  who have contributed. As  such, NO CHARGE OF
  16. ANY KIND IS PERMITTED FOR THIS WORK.
  17.  
  18. The material has been collected from various network conferences worldwide,
  19. and organized  according to subject.  New material is  added quarterly, and
  20. new SWAG  packets are available  from various BBS  sources on a  FIRST call
  21. basis. See BBS.TXT for current support sites and how your BBS can join.
  22.  
  23. GETTING STARTED
  24. ----------------
  25.  
  26. The program READER.EXE is a executable program that will allow you to read,
  27. extract or print the contents of  SWAG packets. These packets are organized
  28. according to subject, with each one containing a number of PASCAL "snipets"
  29. on that subject. In the rest of this document, I'll refer to the program as
  30. "READER".
  31.  
  32. The SWAG packets should be placed ALL together in a directory on your disk.
  33. It is recommended that you create a single directory named '\SWAG'. You can
  34. use the DOS command :
  35.  
  36.                             mkdir c:\swag
  37.  
  38. Unpack  the distribution  archives and  place  all  of the  files with  the
  39. extension of "*.SWG" in this directory along with READER.EXE.
  40.  
  41.  
  42. USING THE READER
  43. ----------------
  44.  
  45. Using the  reader is really very  simple. Just execute it,  and you will be
  46. presented with a  directory of all of the .SWG  files in the directory that
  47. READER is located in. If you have .SWG files elsewhere on your disk, or for
  48. that matter, any disk on your system,  you can move around the disk to find
  49. them  by  selecting  the  ".."  file  which  will  take  you  to the PARENT
  50. directory. Use the HOME, END and the arrow keys to maneuver around.
  51.  
  52. ALSO,
  53.  
  54. The directory window  is search key sensitive. This means  that if you have
  55. .SWG files  or directories listed in  the directory box, you  can just type
  56. the name of the file you want.  For example, pressing 'A' will place you at
  57. the first  entry starting with  'A'. Press 'N',  and you will  jump the the
  58. entry with 'AN...'  if you have one. If  NOT, you will jump the  first file
  59. starting with the letter 'N'.
  60.  
  61. At the bottom  of the screen you will notice  a menu indicating some cursor
  62. and function keys :
  63.  
  64.                         F2 - GREP
  65.                         F5 - Toggle STATS
  66.  
  67.                         <ENTER> - GO
  68.                         ESC - QUIT
  69.  
  70. F2 calls  the GREP (search)  function. This is  a VERY POWERFUL  and useful
  71. function, but  in order to  use this function,  you MUST have  at least ONE
  72. .SWG file  in the directory  box, and it  MUST be highlighted  !! Place the
  73. cursor any one of the .SWG files,  and press F2. You will be presented with
  74. a prompt window :
  75.  
  76.                         SWAG Message Base Reader 3.0
  77. ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
  78. ▓▓┌ D:\SWAG\FILES\ ▓▓┌──────────── SOURCEWARE ARCHIVAL GROUP ───────────┐▓▓
  79. ▓▓│ [A:\]          │▓▓│                                                  │▓▓
  80. ▓▓│ [B:\]          ▓▓▓│ Your SWAG Support Team :                         │▓▓
  81. ▓▓│ [C:\]          │▓▓│                                                  │▓▓
  82. ▓▓│ [E:\]          │▓▓│ Gayle Davis  Goshen, Indiana  46526              │▓▓
  83. ▓▓│ ..\            │▓▓│ Kerry Sokalsky  North York, Ontario  M2P 1L2     │▓▓
  84. ▓▓│ ANSI.SWG       │▓▓│                                                  │▓▓
  85. ▓▓│ ARCHIVES.SWG   │▓▓│ About SWAG :                                     │▓▓
  86. ▓▓│ CHARS.SWG      │▓▓│                                                  │▓▓
  87. ▓▓│ CMDLINE.SWG    │▓▓│ SWAG is a collection of source code and program  │▓▓
  88. ▓▓│ COLOR.SWG      │▓▓│ examples for the PASCAL program language.   The  │▓▓
  89. ▓▓│ COM┌────────────────────── GREP SWAG Files ───────────────────────┐L │▓▓
  90. ▓▓│ COP│  Search For: CURSOR&CRT|ANSI&FILE                            │n │▓▓
  91. ▓▓│ CRC└──────────────────────────────────────────────────────────────┘t │▓▓
  92. ▓▓│ CRT.SWG        │▓▓│ programming platforms available today.           │▓▓
  93. ▓▓│ CURSOR.SWG     │▓▓│                                                  │▓▓
  94. ▓▓│ DATATYPE.SWG   │▓▓│ MUCH THANKS AND GRATITUDE TO ALL CONTRIBUTORS !! │▓▓
  95. ▓▓│ DATETIME.SWG   │▓▓│ NO Charge of ANY kind is permitted for this work │▓▓
  96. ▓▓└────────────────▓▓│                                                  │▓▓
  97. ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓└──────────────────────────────────────────────────┘▓▓
  98. ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
  99.  
  100. Enter a string  to search for. You may search  for a multiple occurrence of
  101. substrings using  BOOLEAN operators AND (&)  OR (|). For example,  a search
  102. for  THIS&THAT|THEM&THOSE would  return  all  snipets containing  both ORed
  103. phrases THIS&THAT OR THEM&THOSE.
  104.  
  105. In BOOLEAN Algebra, the AND operator  takes precedence over the OR operator
  106. (except  when  using  parentheses).  This  is  NOT  the  case with the GREP
  107. function. You  can use the PARENTHESES  () to dictate which  portion of the
  108. search string is  to be processed first. If  multiple levels of parentheses
  109. are used,  the order is RIGHT  to LEFT, starting with  the innermost set of
  110. parentheses, wherever they occur.
  111.  
  112. As an example, in the phrase ((this|that)&(them&those)), (them&those) would
  113. be processed  before (this|that)) innermost  to outermost. In  other words,
  114. all snipets  will be returned  containing THIS or  THAT AND they  also will
  115. contain (THEM and THOSE).
  116.  
  117. Within a set  of parentheses, order will be left  to right. Construction of
  118. the search string itself requires combining the desired substrings together
  119. with  the desired  BOOLEAN operators.  Without the  parentheses, the search
  120. string will be processed logically. THIS|THAT&THEM&THOSE will return all of
  121. the snipets  that contain THIS  plus the  ones  that contain THAT  & THEM &
  122. THOSE. You can  see that this is totally different  than what you'll get by
  123. using the parentheses.
  124.  
  125. Additionally, you can also include a  date in the format MM/DD/YY, and ONLY
  126. records AFTER this  date will be included. If you  enter JUST the date, ALL
  127. SWAG  snipets  AFTER  this  date  will  be  included. For example, entering
  128. CURSOR|ANSI&CRT|05/08/93  would search  the  SWAG  packets for  matches for
  129. CURSOR OR (ANSI  AND CRT) occurring AFTER 05/08/93.  Entering JUST 05/08/93
  130. at the prompt would bring back ALL snipets AFTER 05/08/93 REGARDLESS of the
  131. subject.
  132.  
  133. Enter  an empty  string as  the search  string, and  READER will return all
  134. snipets since the LAST SWAG release.
  135.  
  136. READER will search ALL of the  SWAG packet HEADERS in the CURRENT directory
  137. for matches based  on your criteria. A processing box  will appear, and all
  138. occurrences of your  search string(s) or date matches will  be written to a
  139. NEW SWAG file.  Initially, this file is named GREPSWAG.SWG,  and will be in
  140. the current  directory. Upon completion of  this GREP process, you  will be
  141. asked for the  file name. Enter any name AND  directory you choose, and the
  142. file will be RENAMED and moved  to that directory. Pressing ESCAPE WILL NOT
  143. save a file at all. This process allows you to create SWAG files containing
  144. ANY combination of material that you please.
  145.  
  146. You can  ALSO search the ENTIRE  SWAG snipet buffer for  data. Just enter a
  147. tilde (~) character as the FIRST character on the search line. For instance
  148. to  find all  snipets containing  CRT, you  would enter  ~CRT on the search
  149. line. ONLY  the header of snipets  is searched for matches.  This a way you
  150. can look at all snipets by a certain contributor. You can also use multiple
  151. search criteria  here. For instance,  ~GAYLE DAVIS|GUY MCLOUGHLIN|JOE  BLOW
  152. would bring back  everything for each of these  persons. This search method
  153. is VERY fast as on the headers have  to be read. By the way, the same rules
  154. about AND/OR searching apply when search just the headers.
  155.  
  156. Beginning with  version 3.0, we added  KEYS to the SWAG  header. This makes
  157. the searching function work MUCH faster,  and you can use EDIT HEADER (CTRL
  158. [H]) function to edit these keys.
  159.  
  160. OTHER FUNCTION KEYS IN THE MAIN SCREEN
  161. --------------------------------------
  162.  
  163. ALT[R] lets you rename any of the .SWG files that you have.
  164.  
  165. [DEL] allow you to DELETE any of the .SWG files. BE CAREFUL HERE !!
  166.  
  167. [F5] toggles the  STATS function. In order for this  to work, you MUST have
  168. at least ONE .SWG file in the  directory box, and it MUST be highlighted !!
  169. Place  the cursor  any one  of the  .SWG files,  and press  F5. You will be
  170. presented with an  EXPANDED directory list showing the  description of each
  171. .SWG file and the number of snipets in each.
  172.  
  173. VIEWING, EXTRACTING, PRINTING SWAG SNIPETS
  174. ------------------------------------------
  175.  
  176. Once you have  some .SWG files in the directory  box, press <ENTER> and the
  177. package will be read and you be able to manage the SWAG snipets.
  178.  
  179. You will be  presented with a list of  all of the snipets contained  in the
  180. package with descriptions for each.
  181.  
  182. At the bottom of the screen, will be the following menu.
  183.  
  184.  
  185.  ▀ F1-Help   ▀ F3-Options  ▀ AltFind   ▀ ┘- Read   ▀ F4-DoTags ▀ ESC-Quit
  186.  ▄▄▄▄▄▄▄▄▄   ▄▄▄▄▄▄▄▄▄▄▄▄  ▄▄▄▄▄▄▄▄▄   ▄▄▄▄▄▄▄▄▄▄▄  ▄▄▄▄▄▄▄▄▄▄  ▄▄▄▄▄▄▄▄▄▄
  187.  
  188.  
  189.                 F1   - provides some "quick" ALT keys.
  190.  
  191.                 ┌──────────── READER : HELP ───────────┐
  192.                 │ Alt F       Find Text                │
  193.                 │ Alt S       Sort Index               │
  194.                 │ Alt T       Tag ALL                  │
  195.                 │ Alt U       UnTag ALL                │
  196.                 │ Ctl S       SHELL to DOS             │
  197.                 │ Spacebar    Tag Current              │
  198.                 │ <ENTER>     Read Item                │
  199.                 │                                      │
  200.                 │ F1          Help                     │
  201.                 │ F3          Program Options          │
  202.                 │ F4          Process Tagged Items     │
  203.                 │ ESC         Quit Program             │
  204.                 └──────────────────────────────────────┘
  205.  
  206.                 F3   - brings up the OPTIONS menu.
  207.  
  208.                 ┌──────────────────────┐
  209.                 │  About               │
  210.                 │  Sort - (ALT S)      │
  211.                 │  Spacebar Tag - ON   │
  212.                 │  Colors              │
  213.                 │  Dos Shell           │
  214.                 │  Screen Lines - 25   │
  215.                 └──────────────────────┘
  216.  
  217.                 AltF - Find function
  218.                 <CR> - read the snipet
  219.                 F4   - Process TAGGED items
  220.                 ESC  - Quit
  221.  
  222.  
  223. 43/50 LINE VIDEO
  224. ----------------
  225.  
  226. You will have the capability of using 43/50 line screens if you have EGA or
  227. better.  The  option  can  be  found  in  the  OPTIONS  menu  (F3).  It  is
  228. automatically  disabled if  the user  doesn't have  the capability.  Select
  229. SCREENLINES, and if you have an EGA/VGA, you'll get 43/50 line mode.
  230.  
  231. COLORS
  232. ------
  233.  
  234. To be quite  honest, the whole business of allowing  users to change colors
  235. is quite a  problem. It adds a lot  of code to the program,  and more often
  236. than not, it is used only once  by the user. Therefore, the color selection
  237. if VERY limited.
  238.  
  239. There are four  color group choices available. LIGHTGRAY,  BLUE, CYAN, RED,
  240. GREEN and MAGENTA. Select one that you find pleasing. This will be disabled
  241. on monochrome monitors.
  242.  
  243. DOS SHELL
  244. ---------
  245.  
  246. You can shell  out to DOS from within  the READER. This ability is  here on
  247. the OPTIONS  menu. You can  ALSO do  this  at ANYTIME by  using CTRL[S] key
  248. sequence.
  249.  
  250. SORTING
  251. -------
  252.  
  253. ALT S on the main selection window  brings up the SORT box. The snipets can
  254. be sorted by :
  255.  
  256.                         ┌────────────────────────────┐
  257.                         │                            │
  258.                         │  Select Sort Field :       │
  259.                         │                            │
  260.                         │         N - NUMBER         │
  261.                         │         F - FROM           │
  262.                         │         S - SUBJECT        │
  263.                         │         D - DATE           │
  264.                         │                            │
  265.                         └────────────────────────────┘
  266.  
  267.  
  268. TAGGING ITEMS
  269. -------------
  270.  
  271. Snipets can be tagged by using the SPACEBAR. SPACEBAR tag can be turned OFF
  272. in the OPTIONS menu.  ALL items can be tagged with ALT  T and untagged with
  273. ALT U. Tagged items can be process  using F4. Tag some files, and Press F4.
  274. You'll be given a choice of Zapping the tagged items, or extracting them to
  275. a directory on your disk.
  276.  
  277. FINDING TEXT IN THE MAIN SNIPET WINDOW ( SPEED SEARCH)
  278. ------------------------------------------------------
  279.  
  280. You can  use the ALT[F]  key sequence to  find any text  in the main snipet
  281. window.  Alternately, you  can use  the SPEED  SEARCH feature  by just type
  282. letters or numbers, and the cursor  will automatically be moved to the item
  283. that matches  what you are typing.  The search string will  be displayed at
  284. the  bottom  left  corner  of  the  snipet  window,  and  the  cursor  will
  285. automatically  move to  the matching  item. Numbers  are permitted too. Try
  286. entering  '19', and  you will  be moved   to the  19th item  in the  window
  287. assuming there is one.
  288.  
  289.  
  290. READING SNIPETS
  291. ---------------
  292.  
  293. Pressing <ENTER> on any of the snipets  allows it to be reviewed. You'll be
  294. presented with the  "snipet" screen and you can use  the menu at the bottom
  295. of the screen :
  296.  
  297. ┌────────────────────────────────────────────────────────────────────────┐
  298. │ ▀ Next(+) ▀ preV(-) ▀ Mark ▀ Find ▀ Extract ▀ Kill ▀ Print ▀ ESC-Quit  │
  299. │ ▄▄▄▄▄▄▄▄▄  ▄▄▄▄▄▄▄▄  ▄▄▄▄▄▄  ▄▄▄▄▄  ▄▄▄▄▄▄▄▄  ▄▄▄▄  ▄▄▄▄▄▄▄  ▄▄▄▄▄▄▄▄  │
  300. └────────────────────────────────────────────────────────────────────────┘
  301.  
  302. To accommodate  many of the  QWK reader  users  out there, you  can use the
  303. PLUS(+) and  MINUS(-) keys to  display the NEXT  or PREVIOUS snipet  OR the
  304. SPACEBAR key will display the NEXT snipet.  Also, you can use TAB for NEXT,
  305. and SHIFT+TAB for PREVIOUS.
  306.  
  307. You can  Mark, Find, Extract, Kill  or Print snipets. If  you have a mouse,
  308. you can select any of these functions by using the LEFT button on any item.
  309.  
  310.  
  311. EXTRACTING SNIPETS
  312. ------------------
  313.  
  314. Snipets can be  extract to an ASCII file by  selecting and pressing the 'E'
  315. key. Enter  the filename, and  the data  with  be written out.  If the file
  316. selected is already on  your disk, you will be asked if  you want to APPEND
  317. or OVERWRITE.  You can bring up  a directory selection screen  by using the
  318. DOWN arrow key  while the selection box is on  screen. Select the directory
  319. of your choice.  If you do not enter  a valid path and file  name, you will
  320. receive an error message.
  321.  
  322. KILLING SNIPETS
  323. ---------------
  324.  
  325. Starting with version  2.9, you are able to delete  (KILL) snipets that you
  326. do not  want for some  reason. BE CAREFUL  HERE !!! Once  deleted, they are
  327. gone forever. Upon exit from the file, the entire .SWG file will be rebuilt
  328. to    eliminate    the    killed    snipet.
  329.  
  330.  
  331. EXTRA MENU - CTRL KEYS
  332. ----------------------
  333.  
  334. Pressing the CTRL key brings up the EXTRA menu :
  335.  
  336. ┌────────────────────────────────────────────────────────────────────────┐
  337. │ ▀ Next(+) ▀ preV(-) ▀ Move ▀ Copy ▀ Extract ▀ Header       ▀ ESC-Quit  │
  338. │ ▄▄▄▄▄▄▄▄▄  ▄▄▄▄▄▄▄▄  ▄▄▄▄▄▄  ▄▄▄▄▄  ▄▄▄▄▄▄▄▄  ▄▄▄▄▄▄         ▄▄▄▄▄▄▄▄  │
  339. └────────────────────────────────────────────────────────────────────────┘
  340.  
  341. .. The HEADER function lets you edit the CONTRIBUTOR, SUBJECT and the KEYS.
  342.  
  343. .. The MOVE  function lets  you  move  snipets to  another .SWG  file. The
  344. original snipet will deleted from the current file.
  345.  
  346. ..  The COPY function lets  you  copy  snipets to  another .SWG  file. The
  347. original snipet will remain unchanged.
  348.  
  349.  
  350. PROCESSING TAGGED SNIPETS
  351. -------------------------
  352.  
  353. Once you  have tagged a  group of snipets,  you can process  them using F4.
  354. There are  two functions available. ZAP  all tagged items, and  EXTRACT all
  355. tagged items to a directory on your disk.
  356.  
  357. FINDING TEXT IN SNIPETS
  358. -----------------------
  359.  
  360. You  can  use  the  (F)ind  command  to  find  text located within the SWAG
  361. snipets. This works JUST LIKE the BORLAND  PASCAL IDE. You can ALSO use the
  362. ^Q^F  key sequence  to activate  this function.  Just as  with the  IDE, ^L
  363. displays the NEXT find.
  364.  
  365. SWAG SNIPETS MARKED WITH CHECKMARK
  366. ----------------------------------
  367.  
  368. If you  see snipets with a  CHECKMARK (#251) beside them,  this indicates a
  369. NEW item  added since the LAST  update. The READER.EXE keeps  track of this
  370. and  marks  these  automatically.  The  checkmark  is  only  there for your
  371. reference.
  372.  
  373. THE READER INI FILE
  374. -------------------
  375.  
  376. The READER  program keeps several  of its program  defaults in an  INI file
  377. (simple ASCII) in the same directory  as READER.EXE. Contained in this file
  378. are several items that you can change  to affect the way the program works.
  379. The lines in this file have the format LABEL=VALUE.
  380.  
  381. The file looks like this :
  382.  
  383.          COLOR=LIGHTGRAY       (LIGHTGRAY,BLUE,CYAN,RED,GREEN,MAGENTA)
  384.          43/50=NO              (YES or NO)
  385.          SORT=n                (nUMBER,fROM,tO,sUBJECT,cONFERENCE)
  386.          TEXTEXT=PAS           (default extension for extracted files)
  387.          EXTRACTDIR=D:\TEMP\   (default directory for extraction)
  388.          PRINTER=LPT1          (printer port [LPT1,LPT2,LPT3,LPT4])
  389.          SWAGDIR=\SWAG\FILES\  (Wherever you keep them)
  390.                                (NOTE :  This WILL be overridden by the
  391.                                 SWAG= environment variable !! )
  392.          SWAGADDS=YES          (Display those BBS adds at the top (YES/NO)
  393.          SWAGSTATS=NO          (Start reader in STAT mode or FILES mode)
  394.  
  395. You can change this file using any  word processor. I think that you'll get
  396. the idea.
  397.  
  398.  
  399. THE SWAG ENVIRONMENT VARIABLE
  400. -----------------------------
  401.  
  402. Some users reported a considerable delay while SWAG programs looked for the
  403. .SWG files on  their disks. This problem has been  eliminated by adding the
  404. environment varible SWAG to allow total  override of the SWAGDIR= switch in
  405. the READER.INI. Use the command :
  406.  
  407.                         SET SWAG=yourpath
  408.  
  409. at the DOS prompt to set this.  This then become the ABSOLUTE location that
  410. READER and other  programs use to as the beginning  path for SWAG files and
  411. WILL OVERRIDE you setting in the READER.INI file.
  412.  
  413. COMMAND LINE USAGE
  414. ------------------
  415.  
  416. Starting with  this version of the  READER, individual SWAG packets  can be
  417. read  from  the  DOS  command  line.  Simple  type READER swagfilename. For
  418. example, you can look at all of the snipets in ANSI.SWG by typing :
  419.  
  420.                            READER ANSI.SWG <ENTER>
  421.  
  422. You don't really need to enter the  extension, as the READER will append it
  423. for you.  If the .SWG  files are not  in the current  directory READER will
  424. look for them somewhere on your current PATH.
  425.  
  426. XX3402 ENCODED FILES
  427. --------------------
  428.  
  429. Many  of the  SWAG snipets  contain code  that has  been encoded  using Guy
  430. Mcloughlin's XX3402  encoder. This has  been done due  to the necessity  to
  431. include OBJ  code in the snipet,  and this allows us  a way to do  it. What
  432. this fine  program does is to  create an ASCII encoded  file containing the
  433. BINARY data.  You need to  "CUT" these items  from the snipet,  giving it a
  434. unique name, and  decode it using XX3402. It's really  an easy thing to do.
  435. Once you cut your file out, just execute from the DOS command line :
  436.  
  437.                         XX3402 d yourfilename
  438.  
  439. Magically, the file  needed to compile the snipet will  appear !! It's just
  440. that easy. See the file included  with the SWAG distribution XX3402.ZIP for
  441. complete instructions, and  the COMPLETE SOURCE CODE to  this fine program.
  442. Thanks GUY for letting us use XX3402 for SWAG.
  443.  
  444. We  hope that  you find  the READER   easy to  use, and  the SWAG  material
  445. valuable in development of your PASCAL programs.
  446.  
  447. ENJOY !!!!! and GOOD PROGRAMMING !!!
  448.  
  449. Gayle Davis, Kerry Sokalsky and Jeff Fanjoy
  450. SWAG Support Team
  451.